package com.jgy.cn.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author jiangxs
 * 公共使用部分
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true) // 链式编程
@EqualsAndHashCode(callSuper = true) //自动生成equles和hash
public class Public<T extends Model<?>> extends Model<T> implements Serializable {
    private static final long serialVersionUID = -8350485222877522990L;
    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty("主键ID")
    private String  id;

    @TableField
    @ApiModelProperty("创建日期")
    private Date createDate;

    @TableField
    @ApiModelProperty("变更日期")
    private Date updateDate;
}
